<template>
	<view class="" style="background-color: #FFFFFF;">

		<view class="" style="background-color: #FAFAFA;position: relative;display: flex;justify-content: space-between;">
			<view class="" style="">
				<image :src="img" mode="" style="width: 65px;
				height: 65px;
				border-radius: 50px;margin: 20px;"></image>
			</view>
			<view class="" style="">
				<text style="position: absolute;left: 100px;top: 30px;color: rgba(16, 16, 16, 1);
font-size: 14px;
text-align: left;">当前游戏群：{{qunName}}</text>
			<!-- 	<text style="position: absolute;left: 100px;bottom: 30px;color: rgba(16, 16, 16, 1);
font-size: 14px;">群员管理</text> -->
			</view>
		</view>
		<view class="" style="display: flex;flex-direction: row;flex-wrap: wrap;align-items: center;">


		</view>
		<view class="" style="display: flex;flex-direction: row;justify-content: space-around;padding: 10px;margin-top: 50px;">
			<view class="" style="display: flex;justify-content: center;align-items: center;flex-direction: column;">
				<view class="" style="border-radius: 10px;width: 100px;height: 100px;background-color: #FAFAFA;display: flex;justify-content: center;align-items: center;"
				 @click="canshu">
					<image src="/static/gameimg/canshu.png" mode="widthFix" style="width: 50px;height: 50px;border-radius: 50%;"></image>
				</view>
				<text style="padding-top: 20rpx;">参数设置</text>
			</view>
			<view class="" style="display: flex;justify-content: center;align-items: center;flex-direction: column;">
				<view class="" style="border-radius: 10px;width: 100px;height: 100px;background-color: #FAFAFA;display: flex;justify-content: center;align-items: center;"
				 @click="huqunshezhi">
					<image src="/static/gameimg/fanghu.png" mode="widthFix" style="width: 50px;height: 50px;border-radius: 50%;"></image>
				</view>
				<text style="padding-top: 20rpx;">护群设置</text>
			</view>
			<view class="" style="display: flex;justify-content: center;align-items: center;flex-direction: column;"
			 @click="tongji">
				<view class="" style="border-radius: 10px;width: 100px;height: 100px;background-color: #FAFAFA;display: flex;justify-content: center;align-items: center;">
					<image src="/static/gameimg/shuju.png" mode="widthFix" style="width: 50px;height: 50px;border-radius: 50%;"></image>
				</view>
				<text style="padding-top: 20rpx;">数据统计</text>
			</view>
			<!-- <view class="" style="display: flex;justify-content: center;align-items: center;flex-direction: column;" @click="qunfen">
				<view class="" style="border-radius: 10px;width: 100px;height: 100px;background-color: #FAFAFA;display: flex;justify-content: center;align-items: center;">
					<image src="/static/gameimg/shangxiafen.png" mode="widthFix" style="width: 50px;height: 50px;border-radius: 50%;"></image>
				</view>
				<text style="padding-top: 20rpx;">上下分</text>
			</view> -->
		</view>
		<view class="" style="display: flex;flex-direction: row;justify-content: space-around;">
		<!-- 	<view class="" style="display: flex;justify-content: center;align-items: center;flex-direction: column;" @click="qunfen">
				<view class="" style="border-radius: 10px;width: 100px;height: 100px;background-color: #FAFAFA;display: flex;justify-content: center;align-items: center;">
					<image src="/static/gameimg/shangxiafen.png" mode="widthFix" style="width: 50px;height: 50px;border-radius: 50%;"></image>
				</view>
				<text style="padding-top: 20rpx;">上下分</text>
			</view> -->
			<!-- <view class="" style="display: flex;justify-content: center;align-items: center;flex-direction: column;padding: 30upx;margin-left: 50px;">
				<view class="" style="border-radius: 10px;width: 100px;height: 100px;background-color: #FAFAFA;display: flex;justify-content: center;align-items: center;"
				 @click="jiankongtai">
					<image src="/static/gameimg/jiankong.png" mode="widthFix" style="width: 50px;height: 50px;border-radius: 50%;"></image>
				</view>
				<text style="padding-top: 20rpx;">监控台</text>
			</view> -->
		<!-- 	<view class="" style="display: flex;justify-content: center;align-items: center;flex-direction: column;"
			 @click="tongji">
				<view class="" style="border-radius: 10px;width: 100px;height: 100px;background-color: #FAFAFA;display: flex;justify-content: center;align-items: center;">
					<image src="/static/gameimg/shuju.png" mode="widthFix" style="width: 50px;height: 50px;border-radius: 50%;"></image>
				</view>
				<text style="padding-top: 20rpx;">数据统计</text>
			</view> -->
		</view>

		<!-- <view class="">
			<view class="totalmenu">
				<view class="textth">
					<view style="position: relative;background-color: #FAFAFA;padding: 10px;border-radius: 10px;width: 100px;height: 100px;" @click="canshu">
						<image src="/static/gameimg/canshu.png" mode="" style="width: 50px;
						height: 50px;
						border-radius: 50px;
						position: absolute;
						top: 24px;
						left: 24px;"></image>
					</view>
					<text>参数设置</text>
				</view>
				
				<view class="textth">
					
						<view style="position: relative;background-color: #FAFAFA;padding: 10px;border-radius: 10px;width: 100px;height: 100px; " @click="huqunshezhi">
							<image src="/static/gameimg/fanghu.png" mode="" style="width: 50px;
							height: 50px;
							border-radius: 50px;
							position: absolute;
							top: 24px;
							left: 24px;"></image>
						</view>
						<text>护群设置</text>
					
				</view>
				<view class="textth">
					<view style="position: relative;background-color: #FAFAFA;padding: 10px;border-radius: 10px;width: 100px;height: 100px;">
						<image src="/static/gameimg/shangxiafen.png" mode="" style="width: 50px;
						height: 50px;
						border-radius: 50px;
						position: absolute;
						top: 24px;
						left: 24px;"></image>
					</view>
					<text>上下分</text>
				</view>
				<view class="textth">
					<view style="position: relative;background-color: #FAFAFA;padding: 10px;border-radius: 10px;width: 100px;height: 100px;" @click="jiankongtai">
						<image src="/static/gameimg/jiankong.png" mode="" style="width: 50px;
						height: 50px;
						border-radius: 50px;
						position: absolute;
						top: 24px;
						left: 24px;"></image>
					</view>
					<text>监控台</text>
				</view>
				<view class="textth">
					<view style="position: relative;background-color: #FAFAFA;padding: 10px;border-radius: 10px;width: 100px;height: 100px;">
						<image src="/static/gameimg/shuju.png" mode="" style="width: 50px;
						height: 50px;
						border-radius: 50px;
						position: absolute;
						top: 24px;
						left: 24px;"></image>
					</view>
					<text>数据统计</text>
				</view>
			</view>
		</view> -->
	</view>
</template>

<script>
	export default {
		data() {
			return {
				roomid:'',
				qunName:'',
				img:'',
			}
		},
		onLoad(options){
			console.log(options.roomid)
			this.roomid = options.roomid
			this.groupName = options.groupName
			let token = uni.getStorageSync("token")
			uni.request({
				url: this.G_base + '/api/lz/hqqid',
				method: 'POST',
				header: {
					'content-type': 'application/x-www-form-urlencoded',
					'Authori-zation': 'Bearer ' + token
				},
				data:{
					name:this.groupName,
				},
				success: res => {
					console.log(res)
					this.id =res.data.data.id
					uni.request({
						url: this.G_base + '/api/lz/uqinfo',
						method: 'POST',
						header: {
							'content-type': 'application/x-www-form-urlencoded',
							'Authori-zation': 'Bearer ' + token
						},
						data:{
							qid:res.data.data.id,
						},
						success: res => {
							console.log(res)
							this.qunName=res.data.data.q_name
							this.img=res.data.data.avatar
						}
					})
				}
			})
		},
		onNavigationBarButtonTap(e) {
			console.log(e)
			if(e.float=='right'){
				uni.navigateTo({
					url:'/pages/qunyuan/qunguanliyuan?qid='+this.roomid
				})
			}
		},
		methods: {
			test() {
				uni.navigateBack({
					delta: 1
				})
			},
			huqunshezhi() {
				uni.navigateTo({
					url: "/pages/gameguizetwo/huqun?roomid="+this.roomid
				})
			},
			canshu() {
				uni.navigateTo({
					url: "/pages/gameguizetwo/gameguizetwo?roomid="+this.roomid
				})
			},
			jiankongtai() {
				uni.navigateTo({
					url: "../huqun/jiankongtai/jiankongtai"
				})
			},
			tongji() {
				uni.navigateTo({
					url: "/pages/gameguize/jiankongtai?id="+this.roomid
				})
			},
			qunfen() {
				uni.navigateTo({
					url: '../qunfen/qunfen?id='+this.roomid
				})
			}

		},
	}
</script>

<style>
	.totalmenu {
		display: flex;
		justify-content: center;
		flex-direction: row;
		align-items: center;
		flex-wrap: wrap;
	}

	.textth text {
		margin-top: 20px;
	}

	.textth {
		margin-top: 90px;
		margin-left: 10px;
		margin-right: 10px;
		flex-direction: column;
		display: flex;
		justify-content: center;
		align-items: center;
	}
</style>
